Skip to content

Add NPU to manifest #111

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Mar 6, 2025
Merged

Add NPU to manifest #111

merged 10 commits into from
Mar 6, 2025

Conversation

RHeckerIntel
Copy link
Collaborator

A complicated PR.

Was able to finally do a bit of refactor here since I needed to add the npuEnabled to the manifest and then the project.json.
This meant that I needed to write a migration for older projects.

I took that moment to separate the GetiProject and PublicProject more. Geti projects contain tasks and a public project really wants to have the manifest information in there.

Another thing is that when the user has selected the npu for whisper for example then when the user switches to a computer vision model it should not load it on npu as that is not supported as of right now. In pages/models/inference.dart I added an async check for this since all the info was available for this.

The problem is that I need to change project.json
I could do it ugly and just add npuEnabled as bool or null.
However I want to do a clean up and a migration anyway.

This commit lays the ground work:
 - Migrate to new project is either PublicProject or GetiProject
 - Add migration test for 1.0.0 to 25.0.1

Tests are broken as is. so WIP
This class tries to migrate project jsons on start up
It takes the current ManifestJson which is a weakness. Changes in
manifestJson format might break future migrations, meaning that we need
to be sure that previous migrations keep working. Hense the tests.
…supported model

The InferencePage now does a quick async check and sets the device back
to default if npu is selected.
1. Show file size properly on public model on load
2. Public models are stored in their ID folders instead of a uuid
Copy link

codecov bot commented Mar 5, 2025

Codecov Report

Attention: Patch coverage is 59.05172% with 95 lines in your changes missing coverage. Please review.

Project coverage is 32.03%. Comparing base (bda969f) to head (0863f00).
Report is 11 commits behind head on main.

Files with missing lines Patch % Lines
lib/pages/models/inference.dart 0.00% 27 Missing ⚠️
lib/widgets/model_properties.dart 0.00% 21 Missing ⚠️
lib/project.dart 74.07% 14 Missing ⚠️
lib/deployment_processor.dart 40.00% 9 Missing ⚠️
lib/providers/project_filter_provider.dart 25.00% 6 Missing ⚠️
...pages/computer_vision/widgets/device_selector.dart 0.00% 4 Missing ⚠️
lib/pages/home/home.dart 50.00% 3 Missing ⚠️
lib/pages/text_to_image/playground.dart 0.00% 2 Missing ⚠️
lib/pages/vlm/live_inference_pane.dart 0.00% 2 Missing ⚠️
lib/importers/geti_deployment.dart 0.00% 1 Missing ⚠️
... and 6 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #111      +/-   ##
==========================================
+ Coverage   30.75%   32.03%   +1.27%     
==========================================
  Files         138      141       +3     
  Lines        5693     5704      +11     
==========================================
+ Hits         1751     1827      +76     
+ Misses       3942     3877      -65     
Flag Coverage Δ
integrationtests 17.18% <39.22%> (+<0.01%) ⬆️
unittests 21.33% <42.67%> (+1.82%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@RHeckerIntel RHeckerIntel merged commit 7b8d1c6 into main Mar 6, 2025
14 checks passed
@RHeckerIntel RHeckerIntel deleted the rhecker/add-npu-to-manifest branch March 6, 2025 07:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant